#include "Student.h"

Student::Student()
{}

Student::Student(uint32 ID, const std::string& name, uint32 _class, const std::string& sex, const std::string& number, uint32 grade)
	:ID(ID)
	, name(name)
	, _class(_class)
	, sex(sex)
	, number(number)
	, grade(grade)
{

}

std::string Student::formatInfo()
{
	std::stringstream ss;
	ss << ID << "\t" << name << "\t" << _class << "\t" << sex << "\t" << number << "\t" << grade << std::endl;


	return ss.str();
}

Student Student::formString(const std::string& str)
{
	Student stu;
	std::stringstream ss(str);
	ss << stu.ID << stu.name << stu._class << stu.sex << stu.number << stu.grade << std::endl;

	return stu;
}


